import BTComposite from "../../Base/BTComposite";
import BTTree from "../../Base/BTTree";
import { AbortType } from "../../Enum";
import ActionAttack from "../Action/ActionAttack";
import ActionFailure from "../Action/ActionFailure";
import ActionLog from "../Action/ActionLog";
import ActionSkill from "../Action/ActionSkill";
import ActionSleep from "../Action/ActionSleep";
import ActionWait from "../Action/ActionWait";
import ActionWork from "../Action/ActionWork";
import CompositeRandomSelector from "../Composite/CompositeRandomSelector";
import CompositeRandomSequence from "../Composite/CompositeRandomSequence";
import CompositeSelector from "../Composite/CompositeSelector";
import CompositeSequence from "../Composite/CompositeSequence";
import ConditionalHp from "../Condition/ConditionalHp";
import ConditionalMp from "../Condition/ConditionalMp";
import DecoratorInverter from "../Decorator/DecoratorInverter";

export default class oneTree extends BTTree
{
    constructor()
    {
        super();
        this.initTree();
    }
    initTree()
    {
        this.root = new CompositeSequence([new CompositeSelector([
            new CompositeSequence([new ConditionalMp(), new CompositeSequence([new ActionWait(), new ActionSkill()])], AbortType.Self),
            new CompositeSequence([new ConditionalHp(), new ActionAttack()]),
            new CompositeRandomSequence([new ActionWork(), new ActionSleep()])]),
            
        ]);
/*        this.root = new CompositeSequence([
            new DecoratorInverter([new DecoratorInverter([new ActionLog("1")])]), new ActionLog("2")
        ]);*/
    }
}